Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Resize): new component #1420

Merged
merged 1 commit into from
Apr 25, 2023
Merged

feat(Resize): new component #1420

merged 1 commit into from
Apr 25, 2023

Conversation

abernier
Copy link
Member

@abernier abernier commented Apr 25, 2023

Note Merged
see <Resize> doc

Why / What

A <Resize> component that rescales children to 1 (highest dimension by default).

-> We can then rescale differents things relatively, even for example if they were scaled differently in blender:

const house = useGLTF("/house.gltf");
const character = useGLTF("/character.gltf");

<Resize scale={0.7}><primitive object={house.nodes.table} /></Resize>    {/* 70cm table */}
<Resize scale={1.8}><primitive object={character.nodes.john} /></Resize> {/* 1.8m guy */}

Checklist

  • Documentation updated
  • Storybook entry added
  • Ready to be merged

@vercel
Copy link

vercel bot commented Apr 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
drei ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 25, 2023 4:02pm

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 25, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 1ee0b90:

Sandbox Source
optimistic-browser-uzubgx Configuration
Ground reflections and video textures Configuration
arc-x-pmndrs-colors Configuration

@abernier abernier marked this pull request as ready for review April 25, 2023 15:43
@github-actions
Copy link

🎉 This PR is included in version 9.66.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants